<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
request.setCharacterEncoding("UTF-8");   
response.setCharacterEncoding("UTF-8");
response.setContentType("text/html;charset=UTF-8");
String title = request.getParameter("title");
java.net.URLDecoder urlDecoder = new java.net.URLDecoder(); 
 title =  urlDecoder.decode(title,"UTF-8"); 
 String path = request.getContextPath();
	String basePath = request.getScheme() + "://"+ request.getServerName() + ":" + request.getServerPort()+ path + "/";
//String x = new String(title.getBytes("ISO-8859-1"), "UTF-8"); 
//System.out.println(title+"-------"+x); 
%>
<!DOCTYPE HTML>
<html>
  <head>
    <title>
    <%=title%>
    </title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
		<script type="text/javascript"src="<%=basePath %>js/jquery/jquery-1.7.2.js"></script>
		<%-- <link href="<%=basePath %>css/jquery.loadmask.css" rel="stylesheet" type="text/css" />
		<script type='text/javascript' src='<%=basePath %>js/jquery17.2/jquery.loadmask.js'></script> --%>
		<script type="text/javascript"src="<%=basePath %>js/charts/CnbiSoft.js"></script>
		<script type="text/javascript" src="<%=basePath %>js/common/cnbiBase.js"></script>


	<style type="text/css">
	#p1{
		width: 550px;
		height: 450px;
		margin: 0 auto;
		padding: 0px;
	}
</style>
  </head>

<body>
     
	 <div id="p1">	
	</div>
</body>
<!-- <script type="text/javascript" src="/model/capital_chain/js/capital_chainRes.js"></script>
 --><script type="text/javascript">
	var query = location.search.substring(1);
	var label = decodeURI(query.split("&")[0].split("=")[1]); //decodeURI()字符集
	label = label.split(",");
	var value = query.split("&")[1].split("=")[1].split(",");
	function showPie(){
		return {
			 chartType:1,//图表类型 ：0为单值数据图表;1为多单数据图表;2为多系数据图表
		     swfName:"Pie2D",//这个就不用说了吧！ 
		     domId:"p1",//渲染的dom节点
		     datas:[{index0:"",index1:"",index2:""},[
		     		{index0:"1",index1:label[0],index2:value[0]},
		        	{index0:"2",index1:label[1],index2:value[1]},
		        	{index0:"3",index1:label[2],index2:value[2]},
		        	{index0:"4",index1:label[3],index2:value[3]},
		        	{index0:"5",index1:label[4],index2:value[4]},
		        	{index0:"6",index1:label[5],index2:value[5]},
		        	{index0:"7",index1:label[6],index2:value[6]},
		        	{index0:"8",index1:label[7],index2:value[7]},
		        	{index0:"9",index1:label[8],index2:value[8]},
		        	{index0:"10",index1:label[9],index2:value[9]},
		        	{index0:"11",index1:label[10],index2:value[10]},
		        	{index0:"12",index1:label[11],index2:value[11]},
		        	{index0:"13",index1:label[12],index2:value[12]},
		        	{index0:"14",index1:label[13],index2:value[13]},
		        	{index0:"15",index1:label[14],index2:value[14]},
		        	{index0:"16",index1:label[15],index2:value[15]},
		        	{index0:"17",index1:label[16],index2:value[16]}
		        ]],
		     attributes:'caption="<%=title%>" manageResize="1"  showLabels="1" chartLeftMargin="0" formatNumberScale="0"' +
		     			' smartLabelClearance="0"  ' +
		     			'showBorder="0"  chartTopMargin="0"  bgColor="ffffff" smartLineColor="9400D3" ' +
		     			'bgAlpha="0,0"  showValues="1" isSmartLineSlanted="0"  showLegend="0" showZeroPies="0"',
		     color:["1C86EE","EEC900","6B8E23","9400D3","FF0000","1C86EE","EEC900","6B8E23","9400D3","FF0000",
		       			 "1C86EE","EEC900","6B8E23","9400D3","FF0000","1C86EE","EEC900"],
		     width:"100%",
		     height:460
		};
	}
	CnbiSoft.setCurrentRenderer("JavaScript");
	new Cnbi.model.Chart(showPie());
</script>
</html>
